package com.xinfu.newproject.ui.notice;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.xinfu.newproject.R;
import com.xinfu.newproject.base.BaseFragment;
import com.xinfu.newproject.interface_.SwichFragmentInterface;

import butterknife.BindView;
import butterknife.OnClick;

import static com.xinfu.newproject.activity.NoticeActivity.FRAGMENT_ZERO;

public class NoticeDetailFragment extends BaseFragment {

    @BindView(R.id.head_text)
    TextView titilTv;

    @BindView(R.id.head_back)
    ImageView backIv;

    private SwichFragmentInterface swichFragmentInterface;

    @Override
    protected int setLayoutResourceID() {
        return R.layout.fragment_notice_detail;
    }

    @Override
    protected void setUpView() {
        titilTv.setText("通知详情");
    }

    @Override
    protected void setUpData() {

    }

    @OnClick({R.id.head_back})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.head_back:
                if (swichFragmentInterface != null) {
                    swichFragmentInterface.setSelectedFragment(FRAGMENT_ZERO, 0);
                } else {
                    swichFragmentInterface = (SwichFragmentInterface) getMContext();
                    swichFragmentInterface.setSelectedFragment(FRAGMENT_ZERO, 1);
                }
                break;
        }
    }
}
